<template>
	<el-card class="form-container">
		<el-form :model="systemMenuDetail" label-width="100px">
			<el-form-item label="菜单名称" prop="menuName">
				<el-input v-model="systemMenuDetail.menuName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="父级菜单编号" prop="parentCode">
				<el-input v-model="systemMenuDetail.parentCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单类型" prop="menuType">
				<el-radio-group v-model="systemMenuDetail.menuType" disabled>
					<el-radio label="dirt">目录</el-radio>
					<el-radio label="menu">菜单</el-radio>
				</el-radio-group>
			</el-form-item>
			<el-form-item label=" 菜单描述" prop="menuDesc">
				<el-input v-model="systemMenuDetail.menuDesc" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单路径" prop="menuUrl">
				<el-input v-model="systemMenuDetail.menuUrl" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单图标" prop="menuIcon">
				<template v-if="(systemMenuDetail.menuIcon != null)">
					<svg-icon :icon-class="systemMenuDetail.menuIcon" />
				</template>
			</el-form-item>
			<el-form-item label="授权编码" prop="authCode">
				<el-input v-model="systemMenuDetail.authCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单排序" prop="menuSort">
				<el-input v-model="systemMenuDetail.menuSort" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单状态 1.启用 2.禁用" prop="menuStatus">
				<el-input v-model="systemMenuDetail.menuStatus" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单上下级关系" prop="menuPath">
				<el-input v-model="systemMenuDetail.menuPath" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="创建时间" prop="createTime">
				<el-input v-model="systemMenuDetail.createTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="修改时间" prop="updateTime">
				<el-input v-model="systemMenuDetail.updateTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="菜单在前端对应的组件" prop="menuComponent">
				<el-input v-model="systemMenuDetail.menuComponent" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="close">关闭</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findSystemMenuDetail } from '@/api/admin/systemMenu'
	export default {
		name: 'view-systemMenu',
		data() {
			return {
				systemMenuDetail: {}
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findSystemMenuDetail(val).then(res => {
					console.log('查询返回结果', res)
					this.systemMenuDetail = res.data.responseData
				})
			},
			close() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
